import requests
from bs4 import BeautifulSoup

url = 'http://jobs.51job.com/shanghai-pdxq/74388023.html?s=01&t=0'
headers = {
    'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
}
html_doc = requests.get(url,headers=headers).content

soup = BeautifulSoup(html_doc,'lxml')
div = soup.find(name='div',class_='t1')
spans = div.find_all('span')

education = ''
work_experence = ''
recruitment_number = ''
specialty = ''

for span in spans:
    print span.em.attrs['class'],span.text
